<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<h3>变量输出</h3>
<span th:text="${msg}"></span>
<hr/>
<h3>IF条件判断</h3>
<div th:if="${gender == '男'}">男</div>
<div th:if="${gender == '女'}">女</div>
<hr/>
<h3>switch</h3>
<div th:switch="${gend}">
    <span th:case="1">男</span>
    <span th:case="2">女</span>
</div>
<hr/>
<h3>迭代器</h3>
<table border="1">
    <tr>
        <th>编号</th>
        <th>姓名</th>
        <th>年龄</th>
    </tr>
    <tr th:each="user : ${list}">
        <td th:text="${user.id}"></td>
        <td th:text="${user.name}"></td>
        <td th:text="${user.age}"></td>
    </tr>
</table>
<hr/>
<h3>域对象使用</h3>
<div th:text="${#httpServletRequest.getAttribute('request')}"></div>
<div th:text="${session.session}"></div>
<div th:text="${application.application}"></div>
<div>也可以直接用获取request 获取</div>
<hr/>
<h3>连接语法</h3>
<a th:href="@{~/demo1(id=1,name=ss)}">demo1</a>
</body>
</html>